Conversation
lahma
left a comment
There was a problem hiding this comment.
Looks good, pretty much the same where to I reduced the code to get it working.
| context.EnterChildScope(); | ||
|
|
||
| try | ||
| { |
There was a problem hiding this comment.
What will be returns if an exception is occured?!!
There was a problem hiding this comment.
So this intentionally?!! coz isn't throw before
There was a problem hiding this comment.
Probably we need a remark on that method to make clear to everyone
There was a problem hiding this comment.
I don't think the behavior has changed here. New code just awaits to prevent control flow from getting out with unfinished continuations that could run after finally has been processed.
There was a problem hiding this comment.
What confuses me the old behavior returns the actual string from the StringBuilderPool instace in both case (Exception or Without Exception) but now the string is returned if no exception occurs. Am I right?
There was a problem hiding this comment.
The old code would have done the await on Awaited method which would have bubbled the exception. So both versions will throw, this one obeys template context life time.
There was a problem hiding this comment.
Wrong, if there had been an exception, it would have been thrown by the task that is returned.
No exception is caught here, so everything will bubble up.
Fixes #428